var Fight,
  __extends =
    (this && this.__extends) ||
    (function () {
      var e = function (t, n) {
        return (e =
          Object.setPrototypeOf ||
          ({ __proto__: [] } instanceof Array &&
            function (e, t) {
              e.__proto__ = t;
            }) ||
          function (e, t) {
            for (var n in t)
              Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
          })(t, n);
      };
      return function (t, n) {
        function i() {
          this.constructor = t;
        }
        if ("function" != typeof n && null !== n)
          throw new TypeError(
            "Class extends value " + String(n) + " is not a constructor or null"
          );
        e(t, n),
          (t.prototype =
            null === n
              ? Object.create(n)
              : ((i.prototype = n.prototype), new i()));
      };
    })();
!(function (e) {
  var t = (function (e) {
    function t() {
      var n = e.call(this) || this;
      (n.skin = "fight/btn_bg.png"),
        (n.inited = !1),
        n.size(t.WID, t.HEI),
        n.graphics.drawRect(0, 0, t.WID, t.HEI, "#050033", "#c3b58c", 2),
        n.graphics.drawLine(0, 29, t.WID, 29, "#c3b58c", 4);
      var i = new Laya.Label("普通攻击");
      return (
        i.size(t.WID - 20, 20),
        (i.fontSize = 16),
        (i.color = "#ffff00"),
        (i.align = "center"),
        (i.valign = "middle"),
        i.pos(10, 6),
        (n.atkLabel = i),
        n.addChild(i),
        (i = new Laya.Label("强盗")).size(t.WID - 20, 20),
        (i.fontSize = 14),
        (i.color = "#ffffff"),
        (i.align = "center"),
        (i.valign = "middle"),
        i.pos(10, 34),
        (n.nameLabel = i),
        n.addChild(i),
        (i = new Laya.Label("武士")).size(t.WID - 20, 20),
        (i.fontSize = 14),
        (i.color = "#ffffff"),
        (i.align = "center"),
        (i.valign = "middle"),
        i.pos(10, 58),
        (n.roleTypeLabel = i),
        n.addChild(i),
        (i = new Laya.Label("血:300")).size(t.WID - 20, 20),
        (i.fontSize = 14),
        (i.color = "#ff0000"),
        (i.align = "center"),
        (i.valign = "middle"),
        i.pos(10, 82),
        (n.hpLabel = i),
        n.addChild(i),
        (i = new Laya.Label("蓝:500")).size(t.WID - 20, 20),
        (i.fontSize = 14),
        (i.color = "#00bfff"),
        (i.align = "center"),
        (i.valign = "middle"),
        i.pos(10, 106),
        (n.mpLabel = i),
        n.addChild(i),
        (i = new Laya.Label("速度第二")).size(t.WID - 20, 20),
        (i.fontSize = 14),
        (i.color = "#8A2BE2"),
        (i.align = "center"),
        (i.valign = "middle"),
        i.pos(10, 130),
        (n.spLabel = i),
        n.addChild(i),
        n
      );
    }
    return (
      __extends(t, e),
      (t.prototype.init = function (e, t) {
        (this.atkLabel.text = e),
          (this.nameLabel.text = t.name),
          (this.roleTypeLabel.text = Utils.transform(t.roleType, "roleType")),
          (this.hpLabel.text = "血:" + t.hp),
          (this.mpLabel.text = "蓝:" + t.mp),
          (this.spLabel.text = "速度第" + t.speed),
          this.setType(t.type);
      }),
      (t.prototype.changeAtk = function (e) {
        this.atkLabel.text = e;
      }),
      (t.prototype.setType = function (e) {
        var n = "#660000";
        2 == e && (n = "#004400"),
          this.graphics.drawRect(0, 0, t.WID, t.HEI, n, "#c3b58c", 2),
          this.graphics.drawLine(0, 29, t.WID, 29, "#c3b58c", 4);
      }),
      (t.WID = 92),
      (t.HEI = 164),
      t
    );
  })(Laya.Sprite);
  e.RoleInfo = t;
})(Fight || (Fight = {}));
